import React, {Component, PropTypes} from 'react'
import './index.less'

export default class ErrorPage extends Component {
  PropTypes:{
    errMsg: PropTypes.string.isRequired,
    handleReload: PropTypes.func.isRequired,
  }

  reload = () => {
    this.handleReload && this.handleReload()
  }

  render () {
    return (
      <div>
        <div onClick={this.reload} style={{flex: 1}}>
          <div className='error-till'>
            <p>{this.props.errMsg || '页面出错了哦，请重新加载'}</p>
            <p>点击屏幕重新加载</p>
          </div>
        </div>
      </div>
    )
  }
}
